<!DOCTYPE html >
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="../admin/authority.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="headScriptSM.jsp"%>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/sm/cs11007script.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/share/componentAPI.js"></script>
<style type="text/css">
table.dataTable tbody th, table.dataTable tbody td.receive {
padding: 0px 0px;
}
</style>
</head>
<body>
<input type="hidden" id="url_address" name="url_address" value="">
<input type="hidden" id="agent_browser" name="agent_browser" value="">
	<div class="wrapper">
		<!-- BEGIN Top-Bar -->
		<%@ include file="../fragments/header.jsp"%>
		<!-- END Top-Bar -->

		<div id="detail-area" class="clearfix">
			<!-- BEGIN SIDEMENU -->
			<div class="hidden-xs hidden-sm page-sidebar" id="side-menu-bar">
				<ul class="page-sidebar-menu">					

					<!-- <div id="displaymenu"></div>  -->
					<%@ include file="../admin/menu.jsp" %>

				</ul>
			</div>
		<!-- End Side Menu -->
		<div class="col-sm-12 col-xs-12" id="right-side">
			<div id="navigator-bar"><i class="fa fa-home"></i> หน้าหลัก <i class="fa fa-angle-right ml-5 mr-5"></i>แก้ไขข้อมูลขนาดมาตร</div><!--End navigator-bar-->
			<!-- Start detail-area -->
			<div>
				<div id="page-header" class="clearfix">
					<div>แก้ไขข้อมูลขนาดมาตร</div>
				</div>
				<!-- Start form-detail -->
				<div class="form-detail clearfix" style="margin-bottom:-40px">
					<div class="search-box no-radius ">
						<form class="form-horizontal" role="form">
							<div class="search-header no-radius" style="padding:3px 15px">
								<h4><i class="fa fa-list-alt"></i> แก้ไขข้อมูลขนาดมาตร</h4>
							</div>
							<fieldset class="inner" style="padding-top:0px;">
							<legend>รายละเอียดมาตร</legend>
								<div class="row mt-10">
									<div class="col-sm-5 text-right"><strong>รหัสมาตร</strong> : </div>
									<div class="col-sm-4"><span id="meterCode" name="MeterCode"></span>${MeterCode}</div>
									<input id="mCode" type="text" hidden="hidden" value="${MeterCode}">
								</div>
								<div class="row mt-10">
									<div class="col-sm-5 mt-10 text-right" style="align:center;"><strong>ขนาดมาตร</strong> : </div>
									<div class="col-sm-2"><input type="text" disabled class="form-control text-right" id="meterSize" name="MeterSize" value="${MeterSize}" /></div>
									<input id="mSize" type="text" hidden="hidden" value="${MeterSize}">
									<div class="col-sm-2 mt-10"><strong>นิ้ว</strong></div>
								</div>
								<div class="row mt-10">
									<div class="col-sm-5 mt-10 text-right"><strong>ค่าบริการมาตร</strong> : </div>
									<div class="col-sm-2">
										<p>
											
											<input type="text" class="form-control text-right"   id="meterService1" name="meterService1" name="m" value="${MeterService}" disabled="disabled"/>
											<input id="mService" type="text" hidden="hidden" value="${MeterService}">
										</p>
									</div>
									<div class="col-sm-2 mt-10"><strong>บาท</strong></div>
								</div>
							</fieldset>
						</form>
						<form role="form">
							<div class="search-box  no-radius">
								<div class="form-group clearfix search-header no-radius">
									<div class="pull-left">เพิ่มรายการใหม่</div>
									<div class="pull-right">
										<div id="hide-button"><i class="fa fa-chevron-circle-up"></i></div>
									</div>
								</div>
								<div id="box-body">
									<div class="form-group clearfix mt-20 ">
										<div class="col-sm-3 mt-10">
											<div class="pull-right mt-5">
												<label>เพื่อดำเนินการเรื่อง</label>
											</div>
						  				</div>
						  				<div class="col-sm-3 mt-5">
											<div class="pull-left mt-5 ml-10" style="width:200px;">
										 		<select class="form-control" id="chooseOperate">
													<option value="">-- เลือก --</option>
												</select>
											</div>
						  				</div>
									</div>
									<hr>
									<div class="form-group clearfix mt-20 ">
									
									<div id="divReceiveCode">
										<div class="form-group">
											<div class="row">
												<label for="inputPassword3" class="col-sm-3 mt-10 text-right">รหัสรับเงิน</label>
												<div class="col-sm-9" id="divReceiveRow"></div>
											</div>
										</div>
									</div>
						  				
									</div>
									<div class="form-group mt-20 clearfix search-footer no-radius">
										<div class="col-sm-12 text-center">
											<button onclick="SaveList()" type="button" class="btn btn-primary"><i class="fa fa-floppy-o"></i> บันทึก</button>
											<button id="refresh"  type="button" class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i> เริ่มใหม่</button>
										</div>
								</div>
								</div>
								<!-- END BOX-BODY -->
							</div>
						</form>
					</div>
				</div>
				<!-- End detail-area -->
			</div>
			<!-- End detail-area -->
			<div class="form-detail clearfix" style="margin-top:-20px;padding-top: 0px;">
				<div class="form-list" id="form-list" >
					<form role="form" name="form" action="" method="POST">
						<div class="list-detail-area">						
						<table id="listDataTable" class="stripe hover cell-border" cellspacing="0" width="100%" align="center" >
        					<thead>
            					<tr style="background-color: #399bca; color:white; font-size: 0.9em;">
                					<th style="border-right: 1px solid #999" class="text-center">ลำดับ</th>
									<th style="border-right: 1px solid #999" class="text-center">รหัสคำร้อง</th>
									<th style="border-right: 1px solid #999" class="text-center">รหัสรับเงิน</th>
									<th style="border-right: 1px solid #999" class="text-center">ค่าบริการ (บาท)</th>
									<th class="text-center">จัดการ</th>
            					</tr>
        					</thead> 						
    					</table>
    					
    					<input id="oldMeterCode" type="text" hidden="hidden" value="${MeterCode}">
    					<input type="hidden" name="OldReceiveCode" id="OldReceiveCode" value=""/>	
    					<input type="hidden" name="statusUpdate" id="statusUpdate" value=""/>	
    					<input type="hidden" name="dataDelete1" id="dataDelete1" value=""/>	
    					<input type="hidden" name="dataDelete2" id="dataDelete2" value=""/>		
						</div>	
					</form>
					<div class="modal fade" id="confirmUpdateModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
					   	<div class="modal-dialog" style="width: 400px;">
					        <div class="modal-content">
					            <div class="modal-header">
					            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					            <h4 class="modal-title">ยืนยันการบันทึกข้อมูลประเภทคำร้อง</h4>
					            </div>
					            <div class="modal-body">
					            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
					            	
					            	<span id="modal_content_confirmUpdateModal"></span
					            	>
					            </div>
					            <div class="modal-footer">
					                <button onclick="updateDataTable()" type="button"  class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>
					                <button onclick="cancel()" type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
					        	</div>
					    	</div>
					  	</div>
					</div>
					<div class="modal fade" id="confirmSaveModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
					    <div class="modal-dialog" style="width: 400px;">
					        <div class="modal-content">
					            <div class="modal-header">
					            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					            <h4 class="modal-title">ยืนยันการบันทึกข้อมูลประเภทคำร้อง</h4>
					            </div>
					            <div class="modal-body">
					            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
					            	
					            	<span id="modal_content_confirmSaveModal"></span>
					            </div>
					            <div class="modal-footer">
					                <button onclick="addDataTable()" type="button"  class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>	                
					                <button onclick="cancel()"  type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
					        	</div>
					    	</div>
					  	</div>
					</div>
					<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="confirmModal" aria-hidden="true">
					    <div class="modal-dialog" style="width: 400px;">
					        <div class="modal-content">
					            <div class="modal-header">
					            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					            <h4 class="modal-title">ยืนยันการลบข้อมูลประเภทคำร้อง</h4>
					            </div>
					            <div class="modal-body">
					            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
					            	
					            	<span id="modal_content_confirmModal"></span>
					            </div>
					            <div class="modal-footer">
					                <button onclick="confirmdeleteData()" type="button"  class="btn btn-primary"><i class="fa fa-floppy-o"></i> ยืนยัน</button>
					                <button onclick="cancel()" type="button" class="btn btn-danger" data-dismiss="modal"><i class="glyphicon glyphicon-floppy-remove"></i> ยกเลิก</button>
					        	</div>
					    	</div>
					  	</div>
					</div>
					<div class="modal fade" id="warningModal" tabindex="-1" role="dialog" aria-labelledby="warningModal" aria-hidden="true">
				  	  <div class="modal-dialog" style="width: 400px;">
				        <div class="modal-content">
				            <div class="modal-header">
				            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
				            <h4 class="modal-title">กรุณากรอกข้อมูลให้ถูกต้อง</h4>
				            </div>
				            <div class="modal-body">
				            	<span class="fa-stack fa-lg mr-10" style=" color:#FC0"> <i class="fa fa-exclamation-triangle fa-stack-2x"></i></span>
				            	
				            	<span id="modal_content"></span>
				            </div>
				            <div class="modal-footer" style="text-align: center;">
				                <button type="button" class="btn btn-primary" data-dismiss="modal"><i class="glyphicon glyphicon-ok"></i> ตกลง</button>  
				        	</div>
				    	</div>
				  	</div>
				</div>
				
			</div>
		</div>
		
		<div id="footer-detail">Copyright © สงวนลิขสิทธิ์ พ.ศ.2557 โดย การประปานครหลวง</div>
	</div>
</div>
 <!-- End Detail-area-->

</div>
<!-- End Wrapper -->
</body>
</html>